//############################################################################
//## WiiDS Emulator (DeSmuME Port)
//##--------------------------------------------------------------------------
//## wiids.h
//## - Controls program flow. All things start and end here.
//############################################################################

#ifndef _WIIDS_H_
#define _WIIDS_H_

#include <unistd.h>

#include "includes/FreeTypeGX.h"
#include "filelist.h"

#define APPNAME 		"WiiDS - DS Emulator"
#define APPVERSION 		"0.0.6"
#define APPFOLDER 		"APPS/WIIDS"
#define PREF_FILE_NAME 	"settings.xml"
#define NOTSILENT 0
#define SILENT 1

const char pathPrefix[9][8] = { "", "sd:/", "usb:/", "dvd:/" }; // Set Path Prefixes

//----------------------------------------------------------------------------
// WIIDS - Device Types
//----------------------------------------------------------------------------
enum {
	DEVICE_AUTO,	// Automatic Detection
	DEVICE_SD,		// SD Card
	DEVICE_USB,		// USB Storage Device
	DEVICE_DVD		// DVD Disc
};

//----------------------------------------------------------------------------
// WIIDS - File Types
//----------------------------------------------------------------------------
enum {
//	FILE_SRAM,		// ROM SRAM Save
	FILE_FLASH,		// ROM FLASH Save
	FILE_EEPROM,	// ROM EEPROM Save
	FILE_SNAPSHOT,	// External Save
	FILE_ROM		// ROM File
};

//----------------------------------------------------------------------------
// WIIDS - Languages
//----------------------------------------------------------------------------
//enum {
//	LANG_EN = 0,	// English (Default)
//	LANG_DE,		// German
//	LANG_FR,		// French
//	LANG_SP,		// Spanish
//	LANG_IT,		// Italian
//	LANG_RU,		// Russian
//	LANG_CHS,		// Simplified Chinese
//	LANG_CHT,		// Traditional Chinese
//	LANG_JP,		// Japanese
//	LANG_TH,		// Thai
//	LANG_KR			// Korean
//};

//----------------------------------------------------------------------------
// WIIDS - User Settings
//----------------------------------------------------------------------------
struct SSettings {
    int		AutoLoad;			// Auto-Load ROM (Off, FLASH, EEPROM, Snapshot)
    int		AutoSave;			// Auto-Save ROM (Off, FLASH, EEPROM, Snapshot)
    int		LoadMethod;			// Loading Method (Auto, SD, USB, DVD)
	int		SaveMethod;			// Saving Method (Auto, SD, USB)
	char	LoadFolder[256];	// ROM Folder
	char	SaveFolder[256];	// Save Folder
	char	CoverFolder[256];	// Cover Folder
	int		MusicVolume;		// Music Volume (1 - 100)
	int		SFXVolume;			// Sound FX Volume (1 - 100)
    int		Videomode;			// Video Mode (Auto, NTSC, Progressive, PAL50, PAL60)
    int		VidScaling;			// Scaling Mode (None, Stretch, Fit, Widescreen)
	int		Filtermode;			// Filter (Original, Filtered, Unfiltered)
	int		Rumble;				// Rumble Setting (On, Off)
//	int 	Language;			// Language
};

//----------------------------------------------------------------------------
// WIIDS - Main Functions
//----------------------------------------------------------------------------
void ExitApp();
void ShutdownWii();

//----------------------------------------------------------------------------
// WIIDS - External Functions
//----------------------------------------------------------------------------
extern struct SSettings Settings;
extern int ScreenshotRequested;
extern int ConfigRequested;
extern int ShutdownRequested;
extern int ExitRequested;
extern char appPath[];
extern char loadedFile[];
extern FreeTypeGX *fontSystem[];

#endif	// _WIIDS_H_
